package util;

import java.util.regex.Pattern;

/**
 * Trabalho PD - 2014/2015
 * @author a21210380 a21210392
 */
public class ValidNumber {
    public static boolean isFloat(String str) {
        return Pattern.compile("-?\\d*(.\\d+)?").matcher(str).matches();
    }
    
    public static boolean isInteger(String str) {
        return Pattern.compile("-?\\d*").matcher(str).matches();
    }
}
